WA Crash Viz and Analysis

By Katharine Chen, Tianqi Fang, Yutong Liu, Shuyi Yin

Problem Background

  • Broad variety of factors (environmental, physical, etc) that contribute to a road’s overall safety;
  • Important for general users, in addition to administrative/government officials, to be able to assess road conditions easily in a user-friendly interface;

Use case

  • Average driver may consult the map and analysis before travel;
  • DOT planners, police officers and other professionals may look deeper into contributing factors;
  • They are all non-programmers and thus need an interactive environment that visualize past accidents and tell them what factors contribute most to crashes;
  • Rainy day, steep downhill curved road, old car, young driver;

Python Libraries:

  • Folium;
  • Bokeh;
  • Matplotlib;

Folium simple example

Data cleaning

Mapping

Load datasets with Pandas

Plot with Folium

In [7]:
accWA = plotMap("WA_Rural_St_RtesCrashes_Full.csv",
                "coords_gps.csv",
                "points.html")
accWA
Out[7]:
We can view the plot here.
We don't know the upper limit of folium plotting capacity.

Bokeh simple example

Matplotlib simple example

Comparison of Folium vs. Bokeh vs. Matplotlib

Folium Bokeh Matplotlib
Interactive Interactive Static
Higher capacity Lower capacity Static

Thanks! Q&A time